use util::UnsafeBuf;
use std::sync::Arc;
use std::io::{IoSlice};

pub trait ContainerWriteItem {
	fn len(&self) -> usize;
	fn data_len(&self) -> usize;
	fn empty()-> &'static [u8];
	fn write_slice_to<'a>(&'a self,vec:&mut Vec<IoSlice<'a>>);
}

pub trait ContainerReadItem {
	fn len(&self) -> usize;
	fn read_slice_from(buf:&Arc<UnsafeBuf>) -> Option<Arc<Self>>;
}
